# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py3-cx_freeze
_pkgname=cx_Freeze
pkgver=6.15.12
pkgrel=0
pkgdesc="Set of utilities for freezing Python scripts into executables"
url="https://github.com/marcelotduarte/cx_Freeze"
arch="all !ppc64le"
license="PSF-2.0"
depends="patchelf"
makedepends="py3-gpep517 py3-setuptools python3-dev py3-wheel"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/marcelotduarte/cx_Freeze/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver
options="!check" # todo

prepare() {
	default_prepare

	sed -i 's/DESTSHARED/DESTLIB/' "$builddir/cx_Freeze/freezer.py"
}

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
37030461b5ef8501d51f2a17cbf5fa98e30e826b97b5719ec864eb9daba3ecd70ea0dd802d30210cc49ae0be1575f2ee9f4f0e184724c7afb1598389f1e690a2  py3-cx_freeze-6.15.12.tar.gz
"
